#!/usr/bin/perl

use warnings;
use strict;

use Test::More no_plan =>;

use utf8;
use Math::Geometry::ConeMap;

sub π () {atan2(1,1) * 4};

my $cone = Math::Geometry::ConeMap->new(θ => π/3, D => 1.2);


my $fD = $cone->D_of_y;
my $fφ = $cone->φ_of_x;
my $fxyz1 = $cone->xyz_of_xy;
my $fxyz2 = $cone->xyz_of_Dφ;
my $fZ = $cone->z_of_xy;

ok($fD);
is($fD->(0), 1.2);
ok($fφ);
is($fφ->(0), 0);
ok($fxyz1);
is_deeply([$fxyz1->(0,1.2)], [0,0,'-0']); # huh?
ok($fxyz2);
is_deeply([$fxyz2->(0,0)], [0,0,0]);

# vim:ts=2:sw=2:et:sta
